Circuit for detecting a clock error in a scanned-image system and related circuits, systems, and methods

ABSTRACT

A circuit for detecting a phase error between a clock signal and a beam position includes a beam generator, a sensor, and a phase detector. The beam generator directs a beam toward a beam sweeper in response to the clock signal, and the sensor detects the beam as directed from the beam sweeper. The phase detector determines from the detected beam the error in the clock phase relative to the beam position. Such a circuit can automatically detect the phase error in the pixel clock and correct this error, thus eliminating the need for a manual phase-error corrector. The circuit may also be able to adjust the width and/or the height of a scan region, and thus may also be able to adjust the width and/or height of an image frame within the scan region.

CLAIM OF PRIORITY

This application claims priority to U.S. Provisional Application Ser.No. 60/638,274, filed on Dec. 21, 2004, which is incorporated byreference.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is related to U.S. patent application Ser. No. ______(Attorney Docket No. 1788-41-3), entitled CIRCUIT FOR DETECTING A CLOCKERROR IN A SWEPT-BEAM SYSTEM AND RELATED SYSTEMS AND METHODS, which hasa common filing date and assignee and which is incorporated byreference.

BACKGROUND

Referring to FIG. 1, in a scanned-image system 10 that sweeps a beam 12to generate or capture an image (not shown in FIG. 1), the image mayexhibit noticeable distortion if the pixel clock (not shown in FIG. 1)is not synchronized to the position of the beam.

Assume, for example, that the scanned-image system 10 is a bidirectionalimage-generating system. A beam sweeper, such as amicroelectromechanical (MEMS) mirror 14, rotates back and forth about anaxis 16 to sweep the beam 12 through a scan angle 2θ such that eachleft-to-right and right-to-left sweep of the beam generates a respectiveline of the image (not shown in FIG. 1). In an image plane 18, which maybe occupied by a display screen or, in the case of a virtual retinaldisplay, by a viewer's retina, the mirror 14 sweeps the beam 12 througha scan distance D. Although in this example the generated image isdescribed as spanning the entire scan distance D, the image may spanonly a portion of the scan distance as discussed below in conjunctionwith FIGS. 2-4. Furthermore, although three instances of the swept beam12 are shown, it is understood that the beam may be in only one positionat any one time. According to alternative embodiments, a plurality ofbeams 12 may be swept across the image plane 18.

The pixel clock (not shown in FIG. 1) dictates the pixel that the beam12 generates at a particular time; therefore, if the pixel clock issynchronized with the position of the beam, then the pixel clock causesthe beam to generate a left-most pixel of the image (not shown inFIG. 1) when the beam is in the left-most position L, a center pixelwhen the beam is in the center position C, and a right-most pixel whenthe beam is in the right-most position R.

But if the pixel clock is not synchronized with, i.e., is out of phasewith, the position of the beam 12, then the generated image may bedistorted to a degree that is proportional to the phase error betweenthe pixel clock and the beam. As an extreme example of this phase-errordistortion, assume that the phase of the pixel clock lags the positionof the beam 12 by D/2 during a left-to-right sweep of the beam;consequently, the pixel clock causes the beam to generate a left-mostpixel of the image when the beam is in the center position C, and togenerate a center pixel when the beam is in the right position R. Andduring the following right-to-left sweep of the beam 12, the pixel clockcauses the beam to generate the right-most pixel of the previous linewhen the beam is in the center position C of the current line.

Referring to FIGS. 2-4, an example of the image distortion resultingfrom a phase error in a pixel clock (not shown in FIGS. 2-4) of thescanned-image system 10 (FIG. 1) is discussed in more detail. In thisexample, the MEMS mirror 14 resonates back and forth from left to right,thus causing the position of the beam 12 to be sinusoidal relative totime as shown in FIG. 2.

FIG. 2 is a plot of the horizontal position of the beam 12 in the imageplane 18 (FIG. 1) versus time over one sweep period T (one left-to-rightsweep followed by one right-to-left sweep), with horizontal positionbeing plotted on the vertical axis. Image fields 20 and 22, which thebeam respectively generates during the left-to-right and right-to-leftsweeps, indicate respective field positions for a pixel-clock phaseerror of zero. Image fields 24 and 26, which the beam 12 respectivelygenerates during the left-to-right and right-to-left sweeps, indicaterespective field positions for an illustrative non-zero pixel-clockphase error.

FIG. 3 is a plan view of an undistorted image frame 28 formed in theimage plane 18 by the interleave of the left-to-right and right-to-leftimage fields 20 and 22 of FIG. 2 for a zero pixel-clock phase error.

FIG. 4 is a plan view of a distorted image frame 30 formed in the imageplane 18 by the interleave of the left-to-right and right-to-left imagefields 24 (solid line) and 26 (dashed line) of FIG. 2 for a nonzeropixel-clock phase error.

Referring to FIGS. 1-3, assume that one desires to generate within ascan region 31 of the image plane 18 an image frame 28, which includes avertical line 32 located at a horizontal position between D/5 and 4D/5;therefore, the frame 28 has a width W=3D/5 and is horizontally centeredwithin the scan region. The scan region 31 is defined in the horizontaldimension by the scan distance D and in the vertical dimension by a scandistance V. Borders 34 a and 34 b between the sides of the scan region31 and the image frame 28, here indicated as being D/5 wide, may beincluded, for instance to reduce raster-pinch distortion or provide oneor more other advantages.

Because the pixel-clock phase error equals zero, during eachleft-to-right sweep of the beam 12 the pixel clock may cause the beam togenerate a respective horizontal line of the left-to-right image field20 for a duration T_(imagefield) between times t₁ and t₂, whichrespectively correspond to the beam positions D/5 and 4D/5. Some of thehorizontal sweeps of the left-to-right image field 20 include segments36 of the vertical line 32.

Likewise, during each right-to-left sweep of the beam 12, the pixelclock may cause the beam to generate a respective horizontal line of aright-to-left image field 22 for the duration T_(imagefield) betweentimes t₃ and t₄, which also respectively correspond to the beampositions 4D/5 and D/5. Some of the horizontal sweeps of theright-to-left image field 22 include segments 38 of the vertical line32.

Referring to FIG. 3, because both of the image fields 20 and 22 arecentered within the scan region 31 and have the same horizontal width Wand vertical height H, these fields are aligned in the both thehorizontal and vertical dimensions; consequently, the vertical-linesegments 36 and 38 are aligned such that in the image frame 28, thevertical line 32 has straight edges.

Referring to FIGS. 1-2 and 4, however, a phase error between the pixelclock and the position of the beam 12 may cause the vertical line 32 toappear jagged, or in the extreme case illustrated in FIG. 4, appear astwo separate vertical lines 32 a and 32 b. For example, assume that thepixel clock lags the beam position by a time T_(lag). Therefore, duringeach left-to-right sweep of the beam 12, the pixel clock causes the beamto generate a respective horizontal line of a left-to-right image field24 from time t1′ to time t2′. Likewise, during each right-to-left sweepof the beam 12, the pixel clock causes the beam to generate a respectivehorizontal line of a right-to-left image field 26 from time t3′ to timet4′. Consequently, as shown in FIG. 4, the image field 24 (solid line)is shifted to the right relative to the center of the scan region 31,and the image field 26 (dashed line) is shifted to the left such thatthese fields are not horizontally aligned as are the image fields 20 and22 of FIG. 3. This shifting of the image frames 24 and 26 in oppositedirections causes the resulting image frame 30 to be distorted in thehorizontal dimension. And this distortion causes a misalignment of thevertical-line segments 36 and 38 such that the vertical line 32 nowappears to a viewer (not shown) as the two vertical lines 32 a and 32 b,or for a smaller phase error, as a single vertical line 32 with jaggededges (not shown). Although not shown in FIGS. 3-4, distortion can occurin the vertical dimension if the pixel clock is not synchronized to thevertical position of the beam 12.

SUMMARY

An embodiment of a circuit for detecting a phase error between a clocksignal and a beam position includes a beam generator, a sensor, and aphase detector. The beam generator directs a beam toward a beam sweeperin response to the clock signal, and the sensor detects the beam asdirected from the beam sweeper. The phase detector determines from thedetected beam the error in the clock phase relative to the beamposition.

Such a circuit can automatically detect the phase error in a pixel clockand correct this error, thus eliminating the need for a manualphase-error corrector.

Furthermore, other embodiments of the circuit can adjust the widthand/or height of a scan region, and thus can adjust the width and/orheight of an image frame within the scan region.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a plan view of a conventional scanned-image system.

FIG. 2 is a plot of the horizontal position of the swept beam of FIG. 1versus time, the positions of the left-to-right and right-to-left imagefields generated with a pixel clock having zero phase error relative tothe beam position, and the positions of the left-to-right andright-to-left image fields generated with a pixel clock having anon-zero phase error.

FIG. 3 is an image frame formed by the interleave of the left-to-rightand right-to-left image fields of FIG. 2 for a zero pixel-clock phaseerror.

FIG. 4 is an image frame formed by the interleave of the left-to-rightand right-to-left image fields of FIG. 2 for a nonzero pixel-clock phaseerror.

FIG. 5 is a block diagram of a scanned-image subsystem that includes acircuit for detecting and correcting a phase error in a pixel clockaccording to an embodiment.

FIG. 6 is a plan view of a mask on which the sensor of FIG. 5 may bemounted according to an embodiment.

FIGS. 7A-7B illustrate a technique for determining the phase error ofthe pixel clock of FIG. 5 according to an embodiment.

FIGS. 7C-7D illustrate another technique for determining the phase errorof the pixel clock of FIG. 5 according to an embodiment.

FIG. 8 is a schematic diagram of a circuit for measuring the intensityof a beam portion that strikes the sensor of FIG. 5 according to anembodiment.

FIG. 9 is a block diagram of a scanned-image subsystem that includes acircuit for detecting and correcting a phase error in a pixel clock andfor adjusting the widths and heights of a scan region and of an imageframe according to an embodiment.

FIG. 10 is a plan view of a scan region, an image frame within the scanregion, and a position of the sensor of FIG. 9 relative to the scanregion according to an embodiment.

FIGS. 11A-11B illustrate a technique for determining and correcting thephase error of the pixel clock of FIG. 9 according to an embodiment.

FIG. 12 is a plot of the horizontal position of the swept beam of FIG. 9versus time over one sweep period for two different scan distances D1and D2 relative to a reference distance A according to an embodiment.

FIG. 13 is a plot of the horizontal position of the swept beam of FIG. 9versus time over one sweep period and the relative position of thesensor of FIG. 10 according to an embodiment.

FIG. 14 illustrates a technique for determining and correcting an errorin the scan distance D of a scan region generated by the subsystem ofFIG. 9 according to an embodiment.

FIG. 15 illustrates a technique for determining and correcting an errorin the vertical height V of a scan region generated by the subsystem ofFIG. 9 according to an embodiment.

FIG. 16 is a block diagram of a scanned-image subsystem according to anembodiment that is similar to the scanned-image subsystem of FIG. 9 butthat generates the pixel clock differently than the subsystem of FIG. 9.

FIG. 17 is a block diagram of a scanned-image-generating system that canincorporate one or more of the scanned-image subsystems of FIGS. 5, 9,and 16 according to an embodiment.

FIG. 18 is a block diagram of a scanned-image-capturing system that canincorporate one or more of the scanned-image subsystems of FIGS. 5, 9,and 16 according to an embodiment.

DETAILED DESCRIPTION

The following discussion is presented to enable a person skilled in theart to make and use one or more embodiments of the invention. Thegeneral principles described herein may be applied to embodiments andapplications other than those detailed below without departing from thespirit and scope of the invention. Therefore the present invention isnot intended to be limited to the embodiments shown, but is to beaccorded the widest scope consistent with the principles and featuresdisclosed or suggested herein.

Referring to FIGS. 1 and 4, a technique for correcting a nonzeropixel-clock phase error is to provide the scanned-image system 10 with amanual control (not shown) that a viewer (not shown) manipulates untilthe image within the frame 30 has a good quality. For example, theviewer may manipulate the control to align the segments 36 and 38 intothe line 32 (FIG. 3) having straight edges.

Unfortunately, this technique may be inconvenient for the viewer, andthe manual control may increase the size, complexity, and cost of thescanned-image system 10.

Similarly, referring to FIG. 3, a technique for adjusting the width Wand height H of the frame 28 is to provide the scanned image system 10with one or more manual controls (not shown) that a viewer (not shown)manipulates until the frame has the desired width and height.

Unfortunately, like the manual phase-correction technique, this manualheight-and-width adjustment technique may be inconvenient for theviewer, and the manual control(s) may increase the size, complexity, andcost of the scanned-image system 10.

FIG. 5 is a block diagram of a scanned-image subsystem 40, whichincludes a circuit 42 for detecting and correcting a phase error in apixel clock PCLK.

In addition to the circuit 42, the subsystem 40 includes a beam sweepersuch as the MEMS mirror 14 discussed above in conjunction with FIG. 1, afast-scan drive circuit 44 for causing the mirror to rotate back andforth in a fast-scan dimension (the fast-scan dimension=the horizontaldimension in this embodiment), and a phase-locked-loop (PLL) circuit 46for generating signals RAW_PCLK and H_(sync). The drive circuit 44generates a signal H_(ref), which is a square wave having the samefrequency as the signal (not shown) that the drive circuit generates forrotating the mirror 14, and the PLL 46 generates RAW_PCLK and H_(sync)from H_(ref) in a conventional manner. In one example, the mirror 14rotates back and forth at a frequency of approximately 15 KHz and scansa scan region that is 900 pixels wide in the horizontal dimension, wherethe middle 800 pixels form the image (this leaves 50-pixel-widehorizontal borders between the sides of the image and the correspondingsides of the scan region), H_(ref) and H_(sync) each have a frequency ofapproximately 15 KHz, and RAW_PCLK has a frequency of approximately 13.5MHz and is in phase with H_(ref). But because of e.g., noise, signaldelays, etc., H_(ref) may be out of phase with the position of themirror 14, and thus out of phase with the position of a beam that themirror sweeps. Consequently, H_(sync) and RAW_PCLK may also be out ofphase with the position of the swept beam. According to anotherembodiment, the beam sweeper 14 may comprise a unidirectional beamsweeper such as a rotating polygon mirror for example. According toanother embodiment, the beam sweeper 14 may scan bidirectionally but thebeam source 48 (described below) may be enabled to produce lines orpixels unidirectionally.

The circuit 42 includes a beam source 48 for generating asynchronization beam 50, a beam-source controller 52, a beam sensor 54,and a phase corrector 56, which includes a phase detector 58 and a phaseshifter 60. The controller 52 causes the beam source 48 to generate thesynchronization beam 50 in response to a predetermined cycle of PCLK,the predetermined cycle corresponding to a predetermined pixel positionwithin the horizontal line that the synchronization beam is currentlysweeping. If the subsystem 40 is part of a scanned-image-generatingsystem, then the synchronization beam 50 may comprise the beam or one ofthe beams that the subsystem 40 uses to generate an image, or may be aseparate beam. If the subsystem 40 is part of a scanned-image-capturingsystem, then the synchronization beam 50 may comprise the beam or one ofthe beams that the subsystem uses to illuminate an object, the image ofwhich the system is capturing, or may be a separate beam. According toan illustrative embodiment, the sensor 54 includes a single sensingregion (e.g., the sensor comprises a single photo diode) mounted to amask 62, the sensor being operable to detect the synchronization beam 50as the mirror 14 sweeps the beam onto the sensor, and to generate acorresponding detection signal DS. As discussed below in conjunctionwith FIG. 6, the sensor 54 may be positioned at the horizontal center ofthe scan region within an upper or lower border of the scan region(i.e., the sensor is positioned outside of the image frame). The phasedetector 56 determines from the detection signal DS a phase error PE inPCLK relative to the position of the synchronization beam 50. The phaseshifter 60 generates PCLK from RAW_PCLK, and, in response to the phaseerror PE from the phase detector 56, adds a corresponding phase shift toPCLK to reduce the phase error PE toward or to zero. For example, thephase shifter 60 may be able to adjust the phase of PCLK in incrementsas fine as ⅕- 1/10 of a pixel.

FIG. 6 is a plan view of the mask 62 and the sensor 54 of FIG. 5according to an embodiment.

The mask 62 includes a frame 70, which defines an aperture 72 throughwhich the subsystem 40 (FIG. 5) generates or captures an image frame(not shown in FIG. 6). The frame 70 is formed from a rigid or flexiblematerial and may, for example, be clad with a copper foil or coating.The aperture 72 has horizontal and vertical dimensions W and Hcorresponding to the dimensions of the image frame in the plane of themask 62, and, therefore, is ideally centered within a scan region 74having horizontal and vertical dimensions D and V. An example of thedimensions of the aperture 72 is W=H=250 microns (μm).

The mask 62 also includes a connector 76 for connecting the signal leador leads (not shown) of the sensor 54 to the phase detector 58 (FIG. 5).

According to some embodiments, the sensor 54 is mounted to the frame 70such that the sensor is horizontally centered about a midline 77 betweenthe two sides of the scan region 74, and thus between the two sides ofthe aperture 72. Furthermore, where the sensor 54 is also used to detectand correct an error in the height V of the scan region 74, as discussedbelow in conjunction with FIG. 15, the sensor is located in apredetermined position in the vertical dimension, for example, such thata bottom edge 78 of the sensor is aligned with a top edge 79 of the scanregion 74. Alternatively, the sensor 54 may instead be mounted to thebottom of the mask 70, but horizontally and vertically aligned in amanner similar to that previously described.

The mask 62 may also include a sensor cover 80, which is mounted overthe sensor 54 to define one or two edges, that may for example bestraight, i.e., “knife's”, edges 82 a and 82 b. As discussed below inconjunction with FIG. 7C, a knife's edge aids the phase detector 58(FIG. 5) in determining what portion the beam 50 (FIG. 5) is strikingthe sensor 54. Alternatively, the cover 80 may be omitted where aknife's edge is not needed, or where the edge(s) of the sensor 54 is(are) straight enough to provide a knife's edge. Moreover, the edge 79may also be a knife's edge, particularly where the sensor is used toadjust the height V of the scan region 74 as discussed below inconjunction with FIG. 15.

Still referring to FIG. 6, the sensor 54, copper-clad frame 70, and thecover 80 (if present) may be coated with a transparent orsemi-transparent substance, such as polyimide, that protects the sensor,frame, and cover; and that may also be antireflective. Furthermore,where the transparent substance is polyimide and the synchronizationbeam 50 (FIG. 5) is a beam of red light, then the polyimide acts as afilter that allows the beam to propagate to the sensor 54 but thatfilters out blue and green light to reduce the amount of extraneouslight that strikes the sensor. If allowed to strike the sensor, suchextraneous light may introduce an error into the determination of thePCLK phase error by the phase detector 58 (FIG. 5).

FIG. 7A shows the relative locations of the pixels in two consecutivehorizontal lines 92 and 94 when the pixel clock is in phase with thebeam position. More specifically and with reference to FIGS. 5 and 6,the sensor 54 is centered about the horizontal midline 77 and is as wideas two pixels in both the horizontal and vertical dimensions, and thescan region 74 is 900 pixels wide in the horizontal dimension. Themirror 14 sweeps the synchronization beam 50 from left to right to scanthe line 92, and then sweeps the beam from right to left to scan theline 94. Because PCLK is in phase with the beam 50, the two centerpixels 450 and 451 of each line 92 and 94 are adjacent to andequidistant from the mid line 77, the pixel 450 in the line 92 isvertically aligned with the pixel 450 in the line 94, the pixel 451 inthe line 92 is aligned with the pixel 451 in the line 94, and so on.

FIG. 7B, however, shows the relative locations of the pixels in the twoconsecutive horizontal lines 92 and 94 when the pixel clock lags thebeam position by two pixel positions. More specifically and withreference to FIG. 5, because the pixel clock PCLK lags the beam 50 bytwo pixels, the pixels in the line 92 are effectively shifted two pixelsto the right relative to their in-phase positions shown in FIG. 7A, andthe pixels in the line 94 are effectively shifted two pixels to the leftrelative to their in-phase positions also shown in FIG. 7A.Consequently, there is a four-pixel shift in the line 94 relative to theline 92 such that in the line 92 the pixels 448 and 449 are adjacent toand equidistant from the mid line 77, and in the line 94 the pixels 452and 453 are adjacent to and equidistant from the mid line.

Referring to FIGS. 5, 7A, and 7B, a technique is described for detectingPCLK's two-pixel phase-lag error shown in FIG. 7B and correcting thiserror so that the pixels in the lines 92 and 94 are aligned as shown inFIG. 7A.

First, the beam controller 52 or another section of the circuit 42causes the vertical-scan drive circuit (not shown in FIGS. 5, 7A or 7B)to cause the mirror 14 to sweep the beam 50 in the vertical dimension,it being understood that the mirror scans the lines 92 and 94 only onceper vertical-sweep cycle.

Next, for each left-to-right sweep of the line 92, the beam controller52 activates the beam source 48 such that in the line 92 the beam 50generates a single respective pixel; similarly, for each right-to-leftsweep of the line 94, the beam controller activates the beam source suchthat in the line 94 the beam generates a single respective pixel. Thebeam 50 generates only a single pixel per each sweep of the lines 92 and94 so that the sensor 54 detects the intensity of only one pixel at atime as discussed below. The beam controller 52 continues in this manneruntil the beam 50 generates a predetermined number of the same pixels ineach of the lines 92 and 94. For example, the beam controller 52 causesthe beam 50 to generate sixteen pixels 443-458 (a subset of which areshown in FIGS. 7A and 7B), one in each of the lines 92 and 94, oversixteen successive (though not necessarily immediately successive)sweeps. That is, each left-to-right sweep contains a single respectivepixel in the line 92, and each right-to-left sweep contains a singlerespective pixel in the line 94. These sixteen pixels include and arecentered around the center pixels 450 and 451, because these are thesixteen pixels in each line that are near the sensor 54 when theexpected maximum phase error is ±8 pixels. The beam controller 52 maycause the beam 50 to generate these pixels in numerical order, i.e.,pixel 443 in line 92 during the first left-to-right sweep of line 92,pixel 443 in line 94 during the first right-to-left sweep of line 94,pixel 444 in line 92 during the second left-to-right sweep of line 92,pixel 444 in line 94 during the second right-to-left sweep of line 94,and so on. Or, the beam controller 52 may cause the beam 50 to generatethese pixels in any other order, and may generate these pixels in otherthan sixteen consecutive sweeps of the line 92 and of the line 94. Thebeam controller 52 may include a counter (not shown in FIG. 5) to keeptrack of the pixel number in each line 92 and 94. The signal H_(sync)from the PLL 46 indicates the beginning of the line 92, and thus resetsthe counter to 1. As the mirror 14 sweeps the beam 50 from left to rightacross the line 92, the counter increments by one each cycle of PCLK to900. Then, as the mirror 14 sweeps the beam 50 from right to left acrossthe line 94, the counter decrements by one each cycle of PCLK back to 1.

During the generation of each of the pixels in the lines 92 and 94 perthe preceding paragraph, the sensor 54 generates the detection signalDS, which indicates the relative intensity of the generated pixel. Forexample, referring to FIG. 7B, because the entire pixel 448 in line 92strikes the sensor 54, the sensor measures a maximum relative intensityfor the pixel 448. In contrast, because the pixel 445 in line 92 isthree pixels away from the sensor 54, the sensor measures a relativelylow, perhaps even zero, intensity for the pixel 445.

Then, the phase detector 58 stores the relative intensities for each ofthe pixels that the beam 50 generates, and from these intensitiesdetermines the phase error between the pixel clock PCLK and the positionof the beam.

More specifically, the phase detector 58 first calculates the respectiveintensity centroids C₉₂ and C₉₄ for the lines 92 and 94 according to thefollowing equations: $\begin{matrix}{C_{92} = \frac{\sum\limits_{n = 1}^{PC}{P_{n} \cdot I_{92\quad n}}}{\sum\limits_{n = 1}^{PC}I_{92n}}} & (1) \\{C_{94} = \frac{\sum\limits_{n = 1}^{PC}{P_{n} \cdot I_{94\quad n}}}{\sum\limits_{n = 1}^{PC}I_{94n}}} & (2)\end{matrix}$where PC is the number of pixels (sixteen in the above example) that thebeam 50 generates in each line 92 and 94, P_(n) is the location number(e.g., 450) of the n^(th) pixel, I_(92n) is the measured intensity ofthe n^(th) pixel in the line 92, and I₉₄ is the measured intensity ofthe n^(th) pixel in the line 94.

Next, the phase detector 58 compares C₉₂ to C₉₄.

If C₉₂=C₉₄, or C₉₂≈C₉₄ (for example, within ±5%), then the phasedetector 58 determines that the phase error PE between PCLK and theposition of the beam 50 is below a predetermined phase-error threshold(for example a threshold corresponding to C₉₂−C₉₄ within ±5% of$\left. \frac{C_{92} + C_{94}}{2} \right),$and thus does not need to be corrected.

If C₉₂>C₉₄ such that the PE>the magnitude of the predeterminedphase-error threshold (PE positive), then the phase detector 58determines that the phase of PCLK leads the position of the beam 50, andthus that the phase shifter 60 must retard the phase of PCLK to drivethe phase error PE toward or to zero.

In contrast, if C₉₂<C₉₄ such that PE<the magnitude of the predeterminedphase-error threshold (PE negative), then the phase detector 58determines that the phase of PCLK lags the position of the beam 50 asshown in FIG. 7B, and thus that the phase shifter 60 must advance thephase of PCLK to drive the phase error PE toward or to zero.

Next, the phase shifter 60 adjusts the phase of PCLK as indicated by thevalue of PE. If the magnitude of PE is less than the predeterminedphase-error threshold, then the phase shifter 60 maintains PCLK at itscurrent phase. If PE is positive, then the phase shifter 60 retards thephase of PCLK by an amount that is proportional to the magnitude of PE.Conversely, if PE is negative, then the phase shifter 60 advances thephase of PCLK by an amount that is proportional to the magnitude of PE.To stabilize the phase-correction loop formed by the circuit 42, thephase shifter 60 may, for each new value of PE received from the phasedetector 58, only partially correct the phase of PCLK. This is akin toreducing the gain of a negative feedback loop so that the loop does notoscillate.

If necessary, the circuit 42 repeats the above-described sequence untilthe phase error PE is less than the predetermined phase-error threshold.

Still referring to FIGS. 5, 7A, and 7B, an example of theabove-described technique is provided.

In this example, the pixels of the lines 92 and 94 are aligned as shownin FIG. 7B, the measured intensities of the pixels 448 and 449 in theline 92 and of the pixels 452 and 453 in the line 94 each equal 1, themeasured intensities of the pixels 447 and 450 in the line 92 and thepixels 451 and 454 in line 94 equal 0.5, the measured intensities of thepixels 446 and 451 in line 92 and the pixels 450 and 455 in line 94equal 0.25, and the measured intensities of all other pixels in thelines 92 and 94 equal 0.

Therefore, from equation (1):$C_{92} = {\frac{{446 \cdot 0.25} + {447 \cdot 0.5} + {448 \cdot 1} + {449 \cdot 1} + {450 \cdot 0.5} + {451 \cdot 0.25}}{0.25 + 0.5 + 1 + 1 + 0.5 + 0.25} = 514.67}$

and from equation (2):$C_{94} = {\frac{{450 \cdot 0.25} + {451 \cdot 0.5} + {452 \cdot 1} + {453 \cdot 1} + {454 \cdot 0.5} + {455 \cdot 0.25}}{0.25 + 0.5 + 1 + 0.5 + 0.25} = 517.07}$

Because C₉₂<C₉₄, the phase detector 58 generates a negative value for PEthat is proportional to the difference C₉₄−C₉₂=2.4. Assuming here thatthe magnitude of PE is greater than the magnitude of the predeterminedphase-error threshold, in response to this value of PE, the phaseshifter 60 advances the phase of PCLK.

The circuit 42 repeats this procedure as needed to align the pixels ofthe lines 92 and 94 as shown in FIG. 7A.

Still referring to FIGS. 5, 7A, and 7B, although the abovephase-detection-and-correction technique is described where a pixeleither fully strikes or fully misses the sensor 54, the technique alsoworks where one or more of the pixels partially strikes the sensor.

Furthermore, this technique also works where the horizontal dimension orthe vertical dimension of the sensor 54 is smaller or greater than thewidth of two pixels.

In addition, instead of generating each pixel only once, the beamcontroller 52 can generate multiple instances of each pixel, and thephase detector 58 can filter out noise by calculating the intensity ofeach pixel as the average intensity of the respective multiple pixelinstances.

Moreover, the predetermined phase-error threshold may not be symmetricalabout zero. That is, the magnitude of the threshold for positive PE maybe different than the magnitude of the threshold for negative PE.

Furthermore, this technique works where the sensor 54 is nothorizontally centered about the mid line 77, as long as the sensor iswithin an area covered by the pixels that the beam 50 generates duringthe execution of this technique. For example, referring to FIG. 7A,suppose that the sensor 54 is shifted to the right such that thehorizontal center of the sensor is between the pixels 451 and 452 of thelines 92 and 94 instead of between the pixels 450 and 451 as shown inFIG. 7A. When the circuit 42 operates according to the above-describedtechnique to correct a phase error in PCLK, the circuit still properlyadjusts the phase of PCLK so that the pixels 451 of the lines 92 and 94are vertically aligned on the left side of the sensor 54 and the pixels452 are vertically aligned on the right side of the sensor 54. And ifthe sensor 54 is near the edge of or outside of the area covered by thepixels that the beam 50 initially generates, one can typically detectthis during testing (for example, because the circuit 42 does notcorrect the phase error in PCLK) and reprogram the beam controller 52 togenerate pixels that are in the area in which the sensor is disposed.Or, one can program the beam controller 52 to generate all of the pixelsin each line 92 and 94 so that the phase detector 58 can always detectthe phase error in PCLK regardless of the horizontal position of thesensor 54.

But although this technique works where the sensor 54 is nothorizontally centered about the mid line 77, where the mirror 14horizontally sweeps the beam in a sinusoidal fashion per FIG. 2, one mayprefer that the sensor 54 be horizontally centered (or approximatelyhorizontally centered) about the midline 77 because the midline is wherethe velocity of the beam 50 is the greatest, and thus where a phaseerror in PCLK causes the greatest, and thus often the most detectable,spatial horizontal offset between the pixels of the lines 92 and 94.

Referring to FIGS. 5, 7C, and 7D, another technique is described fordetecting and correcting a pixel-clock phase error. More specifically, atechnique is described for detecting PCLK's partial-pixel phase leadshown in FIG. 7D and correcting this error so that the pixels in thelines 92 and 94 are aligned as shown in FIG. 7A.

FIG. 7C shows the sensor 54 having a horizontal width of one pixel, avertical height of two pixels, a right edge aligned with the midline 77,and the knife's edge 82 a extending through the centers of the pixels450 in the lines 92 and 94 when the phase error of PCLK is zero.

FIG. 7D shows the positions of the pixels 450 in the lines 92 and 94relative to the knife's edge 82 a when the phase of PCLK leads theposition of the beam 50 by a partial pixel.

To detect and correct the phase error in PCLK, the beam controller 52 oranother section of the circuit 42 first causes the vertical-scan drivecircuit (not shown in FIGS. 5, 7A or 7B) to cause the mirror 14 to sweepthe beam 50 in the vertical dimension, it being understood that themirror scans the lines 92 and 94 only once per vertical-sweep cycle.

Next, during a left-to-right sweep of the line 92, the beam controller52 activates the beam source 48 such that in the line 92 the beam 50generates the pixel 450; similarly, for a subsequent right-to-left sweepof the line 94, the beam controller activates the beam source such thatin the line 94 the beam generates the pixel 450.

During the generation of each of the pixels 450 in the lines 92 and 94per the preceding paragraph, the sensor 54 generates the detectionsignal DS, which indicates the relative intensity of the generatedpixel. For example, referring to FIG. 7D, because the portion of thepixel 450 in the line 94 that strikes the sensor 54 is larger than theportion of the pixel 450 in the line 92 that strikes the sensor, thesensor measures a greater intensity for the pixel 450 in the line 94than it does for the pixel 450 in the line 92.

Then, the phase detector 58 stores the relative intensities for the twopixels 450 that the beam 50 respectively generates in the lines 92 and94, and from these intensities determines the phase error between PCLKand the position of the beam.

If the measured intensity of the pixel 450 in the line 92 equals orapproximately equals (e.g., within ±5%) the measured intensity of thepixel 450 in the line 94, then the phase detector 58 determines that thephase error PE between PCLK and the position of the beam 50 is below apredetermined phase-error threshold, and thus does not need to becorrected.

If the measured intensity of the pixel 450 in the line 92 is greaterthan the measured intensity of the pixel 450 in the line 94 by more thana predetermined threshold, then the phase detector 58 determines thatthe phase of PCLK leads the position of the beam 50 (PE positive), andthus that the phase shifter 60 must retard the phase of PCLK to drivethe phase error PE toward or to zero.

In contrast, if the measured intensity of the pixel 450 in the line 92is less than the measured intensity of the pixel 450 in the line 94 bymore than a predetermined threshold, then the phase detector 58determines that the phase of PCLK lags the position of the beam 50 asshown in FIG. 7D (PE negative), and thus that the phase shifter 60 mustadvance the phase of PCLK to drive the phase error PE toward or to zero.

Next, the phase shifter 60 adjusts the phase of PCLK as indicated by thevalue of PE in a manner similar to that discussed above in conjunctionwith FIGS. 7A and 7B. That is, if the magnitude of PE is less than thepredetermined phase-error threshold, then the phase shifter 60 maintainsPCLK at its current phase. If PE is positive and greater in magnitudethan the predetermined threshold, then the phase shifter 60 retards thephase of PCLK by an amount that is proportional to the magnitude of PE.Conversely, if PE is negative and greater in magnitude than thepredetermined threshold, then the phase shifter 60 advances the phase ofPCLK by an amount that is proportional to the magnitude of PE. Tostabilize the phase-correction loop formed by the circuit 42, the phaseshifter 60 may, for each new value of PE received from the phasedetector 58, only partially correct the phase of PCLK.

If necessary, the circuit 42 repeats the above-described sequence untilthe magnitude of the phase error PE is less than the predeterminedphase-error threshold, and the pixels 450 in the lines 92 and 94 arealigned or approximately aligned as shown in FIG. 7C.

Still referring to FIGS. 5, 7C, and 7D, alternate embodiments of thistechnique are contemplated.

For example, instead of generating each pixel 450 only once, the beamcontroller 52 can cause the beam 50 to generate multiple instances eachpixel 450, and the phase detector 58 can filter out noise by calculatingthe intensity of each pixel 450 as the average intensity of therespective multiple pixel instances each pixel to filter out noise.

Moreover, this technique works where the sensor 54 is not near the midline 77, as long as the knife's edge 82 a is aligned with the centers oftwo of the same pixels in lines 92 and 94 when PCLK has zero phaseerror. For example, the sensor 54 may be shifted to the right such thatthe edge 82 a is aligned with the centers of the pixels 451 (not shownin FIGS. 7C-7D) instead of with the centers of the pixels 450. If themisalignment of the sensor 54 with the pixels 450 is inadvertent, onecan typically determine this during testing of the circuit 42 (forexample, the circuit 42 does not correct the phase error in PCLK basedon the generation of the pixels 450) and reprogram the beam controller52 to generate the pixels, e.g., the pixels 451, in the lines 92 and 94with which the edge 82 a is aligned when PCLK has zero phase error. Forexample, where the edge 82 a is aligned with the pixels 451 instead ofwith the pixels 450 when PCLK has zero phase error, one can add anoffset of one pixel to the beam controller 52 such that it generates thepixels 451 in lines 92 and 94 instead of the pixels 450.

But, although this technique works where the sensor 54 is not near themid line 77, where the mirror 14 horizontally sweeps the beam in asinusoidal fashion per FIG. 2, one may prefer that the sensor 54 be nearthe midline because the midline is where the phase error is PCLK may bemost detectable for the reason discussed above in conjunction with FIGS.7A-7B.

FIG. 8 is a schematic diagram of a circuit 100 for measuring theintensity of a pixel that strikes the sensor 54. The circuit 100 may beincluded within the phase detector 58 of FIG. 5.

Referring to FIGS. 5 and 8, the operation of the circuit 100 isdescribed.

During a period where the beam controller 52 is not generating a pixelwith the synchronization beam 50, a switch 102 forces a voltageV_(bias1)−V_(bias2) across the single photo diode that composes thesensor 54, and across a parasitic or actual capacitor 104, which is inparallel with the sensor.

In response to the beam controller 52 activating the beam 50 to generatea pixel, the switch 102 toggles to couple the sensor 54 to a currentsource 106, which generates a constant current Ic that is greater thanthe maximum current expected from the sensor. The beam controller 52 maygenerate a signal (not shown) that causes the switch 102 to toggle asdescribed.

Also in response to the beam controller 52 activating the beam 50, acounter 108 begins counting from a predetermined initial count valuesuch as 0. The counter 108 may receive PCLK or another clock signal as acounting clock.

In response to the beam 50, the sensor 54 sinks a current (the signalDS) having a magnitude that is proportional to the portion of the beamthat strikes or that is otherwise detected by the sensor. The currentsunk by the sensor 54 and the current Ic combine to charge the capacitor104. But because the current sunk by the sensor 54 tends to dischargethe capacitor 104, the greater this sunk current, the longer it takesthe current Ic to charge the capacitor 104. Therefore, it follows thatthe greater the portion of the beam 50 that the sensor 54 detects, thelonger it takes the current Ic to charge the capacitor 104, and viceversa.

An amplifier 110 amplifies the voltage across the capacitor 104 andprovides the amplified voltage to a comparator 112.

When the amplified voltage exceeds a predetermined threshold voltageV_(threshold), the output of the comparator 112 toggles, thus stoppingthe counter and causing the switch 102 to toggle back to the state inwhich the switch drives a voltage V_(bias1)−V_(bias2) across the sensor54.

Consequently, the count value represents the measured intensity of thepixel generated by the beam 50. That is, the greater the count value thegreater the measured pixel intensity, and the lower the count value thelower the measured pixel intensity.

Still referring to FIG. 8, other embodiments of the circuit 100 may havedifferent topologies, and may also include more or fewer components.

FIG. 9 is a block diagram of a scanned-image subsystem 120, whichincludes a circuit 122 for detecting and correcting a phase error in apixel clock PCLK, for adjusting the respective horizontal widths D and Wof a scan region and the image frame within the scan region, and foradjusting the respective vertical heights V and H of the scan region andimage frame. Therefore, in addition to automatically correcting a phaseerror in PCLK, the circuit 122 also corrects errors in the height andwidth of the image frame. Furthermore, because the subsystem 120includes components common to the subsystem 40 of FIG. 5, thesecomponents have the same reference numbers in both FIGS. 5 and 9.

Like the subsystem 40 of FIG. 5, the subsystem 120 includes the MEMSmirror 14, the horizontal-scan drive circuit 44 for causing the mirrorto rotate back and forth in the horizontal dimension, thephase-locked-loop (PLL) circuit 46 for generating signals RAW_PCLK andH_(sync) from the signal H_(ref), and a vertical-scan drive circuit 124(not shown in FIG. 5) for causing the mirror 14 to rotate back and forthin the vertical dimension.

But unlike the subsystem 40, the subsystem 120 also includes a reflector126 for directing the synchronization beam 50 to a sensor 128, which isfurther discussed below. The reflector 126 allows one to mount thesensor 128 behind the mirror 14 instead of on the mask 62 (FIG. 5) orotherwise in front of the mirror, although one may omit the reflectorand mount the sensor 128 to the mask 62 or otherwise in front of themirror.

Furthermore, like the circuit 42 of FIG. 5, the circuit 122 includes thebeam source 48 for generating the synchronization beam 50 and includesthe beam-source controller 52.

But unlike the circuit 42, the circuit 122 includes the sensor 128, ahorizontal-width adjuster 130, a vertical-height adjuster 132, and aphase corrector 134, which includes a phase detector 136 and the phaseshifter 60. Unlike the sensor 54 (FIG. 5), which includes a singlesensing region, the sensor 128 includes multiple sensing regions, andgenerates multiple corresponding detection signals DS. Furthermore, asdiscussed below in conjunction with FIG. 10, the sensor 128 ispositioned away from the horizontal center of the scan region within anupper or lower border region. Like the phase detector 56 (FIG. 5), thephase detector 136 determines from the detection signals DS a phaseerror PE in PCLK relative to the position of the synchronization beam50; but as discussed below, the phase detector 136 makes thisdetermination differently than the phase detector 56 does as discussedabove in conjunction with FIGS. 7A-7D. And the adjusters 130 and 132respectively detect and correct errors in the horizontal width D and thevertical height V of a scan region (FIG. 10) in response to the signalsDS from the sensor 128. Of course for an image frame of given pixeldimensions, detecting and correcting errors in D and V inherentlydetects and corrects errors in the width W and height H of the imageframe within the scan region.

FIG. 10 is a diagram showing an example of the virtual position of thesensor 128 of FIG. 9. Because this diagram includes features common tothe diagram of FIG. 6, these features have the same reference numbers inboth FIGS. 6 and 10. More specifically, the virtual position of thesensor 128 is the position of the sensor relative to the image frame 72and the scan region 74 scanned by the mirror 14 (FIG. 5). That is,although the sensor 128 may be mounted behind the mirror 14, thereflector 126 (FIG. 9) is positioned such that the virtual position ofthe sensor 128 is as shown, with the center of the sensor a distance D/xfrom the midline 77 of the scan region 74.

In the embodiment of FIG. 10, the sensor 128 includes four sensingregions S1, S2, S3, and S4, which are arranged as square quadrants. Arespective photo diode may compose each of these regions, which arecontiguous along straight horizontal and vertical boundaries 140 and142. These boundaries are similar to the knife's edges 82 a and 82 b ofFIG. 6. The sensor 128 also has outer edges 144, 146, 148, and 150,which are also straight and similar to the knife's edges 82 a and 82 b.Alternatively, a cover similar to the cover 80 (FIG. 6) may be placedover the sensor 128 to define the boundaries 140 and 142 and/or theedges 144-150.

Referring to FIGS. 9-10, in an embodiment where the circuit 122 uses thesensor 128 only to adjust the vertical height V of the scan region 74,the sensing regions S1 and S2 may be combined into a single top sensingregion, and the regions S3 and S4 may be combined into a single bottomsensing region such that the sensor has only top and bottom rectangularsensing regions contiguous along the horizontal boundary 140. That is,the vertical boundary 142 does not exist.

Conversely, in an embodiment where the circuit 122 (FIG. 9) does not usethe sensor 128 to adjust the vertical height V of the scan region 74,the sensing regions S1 and S3 may be combined into a single left sensingregion, and the regions S2 and S4 may be combined into a single rightsensing region such that the sensor has only left and right rectangularsensing regions contiguous along the vertical boundary 142. That is, thehorizontal boundary 140 does not exist.

Still referring to FIGS. 9-10, the different embodiments of the sensor128 and the value of x are further discussed below in conjunction withFIGS. 11A-15. Moreover, because the sensor 128 has multiple sensingregions S, each of the horizontal-width adjuster 130, vertical heightadjuster 132, and the phase detector 136 may include a respectivecircuit such as the circuit 100 (FIG. 8) for each sensing region S toconvert the signal DS from that region S into a respective intensityvalue. For example, the phase detector 136 may include four circuits100, one for each of the sensing regions S1-S4.

FIG. 11A shows the sensor 128 having a horizontal width of two pixelsand a vertical height of two pixels (i.e., each sensing region S has thedimensions of a pixel), having the horizontal boundary 140 locatedbetween the pixels 251 in the horizontal lines 92 and 94, and having thevertical boundary 142 extending through the left sides of the pixels 251in the lines 92 and 94 when the phase error of PCLK (FIG. 9) equals 0.

FIG. 11B shows the positions of the pixels 251 in the lines 92 and 94relative to the boundary 142 when the phase of PCLK (FIG. 9) leads theposition of the beam 50 (FIG. 9) by a partial pixel.

Referring to FIGS. 9, 10, 11A, and 11B, a technique that the circuit 122may implement for detecting and correcting a pixel-clock phase error isdescribed. As a specific example, the technique is described fordetecting PCLK's partial-pixel phase-lead error shown in FIG. 11B andcorrecting this error so that the pixels 251 in the lines 92 and 94 arealigned as shown in FIG. 11A. This technique is similar to the techniquethat the circuit 42 (FIG. 5) may implement to detect and correct thePCLK phase error as discussed above in conjunction with FIGS. 7C and 7D.

First, the beam controller 52 or another section of the circuit 122causes the vertical-scan drive 124 to cause the mirror 14 to sweep thebeam 50 in the vertical dimension.

Next, during a left-to-right scan of the line 92, the beam controller 52activates the beam source 48 such that in the line 92 the beam 50generates the pixel 251; similarly, for a subsequent right-to-left scanof the line 94, the beam controller activates the beam source such thatin the line 94 the beam generates the pixel 251.

During the generation of each of the pixels 251 in the lines 92 and 94per the preceding paragraph, the sensor 128 generates one respectivedetection signal DS for each sensing region S1-S4, and these signalsDS1-DS4 indicate the relative intensity of the portion of the generatedpixel that strikes or is otherwise detected by the corresponding sensingregion. For example, referring to FIG. 11B, because the portion of thepixel 251 in the line 92 that strikes the sensing region S1 is largerthan the portion of the pixel 251 in the line 92 that strikes thesensing region S2, the sensing region S1 measures a greater intensityfor the pixel 251 in the line 92 than the sensing region S2 does.

Then, for each of the sensing regions S1-S4, the phase detector 136stores the relative intensities for each of the pixels 251 that the beam50 respectively generates in the lines 92 and 94, and from theseintensities determines the phase error between PCLK and the position ofthe beam.

Generally, where the pixel 251 in the line 92 is vertically aligned withthe pixel 251 in the line 94, the phase error equals zero. With specificreference to the sensor 128, where the portion of the pixel 251 in theline 92 on the left side of the boundary 142 equals the portion of thepixel 251 in the line 94 on the left side of the boundary 142, and theportion of the pixel 251 in the line 92 on the right side of theboundary 142 equals the portion of the pixel 251 in the line 94 on theright side of the boundary 142, the phase error is zero.

Therefore, for each pixel 251, the phase detector 136 next computes aposition-dependent intensity value PDI according to the followingequations:PDI ₉₂=[(DS1₉₂ +DS3₉₂)−(DS2₉₂ +DS4₉₂)]/(DS1 ₉₂ +DS2₉₂ +DS3₉₂+DS4₉₂)  (3)PDI ₉₄=[(DS1₉₄ +DS3₉₄)−(DS2₉₄ +DS4₉₄)]/(DS1₉₄ +DS2₉₄ +DS3₉₄ +DS4₉₄)  (4)where PDI₉₂ is the position-dependent intensity value for the pixel 251in the line 92, DS1 ₉₂−DS4 ₉₂ are the respective intensity measurementsfrom the regions S1-S4 of the sensor 128 for the pixel 251 in the line92, PDI₉₄ is the position-dependent intensity value for the pixel 251 inthe line 94, and DS1 ₉₄−DS4 ₉₄ are the respective intensity measurementsfrom the regions S1-S4 of the sensor for the pixel 251 in the line 94.

Next, the phase detector 136 compares PDI₉₂ to PDI₉₄.

If PDI₉₂ equals or approximately equals PDI₉₄ (for example, within apredetermined threshold of ±5%), then the phase detector 136 determinesthat the phase error PE between PCLK and the position of the beam 50 isbelow a predetermined phase-error threshold, and thus that PE does notneed to be corrected.

If PDI₉₂<PDI₉₄ by more than the magnitude of a predetermined threshold,then the phase detector 136 determines that the phase of PCLK lags theposition of the beam 50 (PE negative), and thus that the phase shifter60 must advance the phase of PCLK to drive the phase error PE toward orto zero.

In contrast, if PDI₉₂>PDI₉₄ by more than the magnitude of apredetermined threshold, then the phase detector 136 determines that thephase of PCLK leads the position of the beam 50 as shown in FIG. 11B (PEpositive), and thus that the phase shifter 60 must retard the phase ofPCLK to drive the phase error PE toward or to zero.

Next, the phase shifter 60 adjusts the phase of PCLK as indicated by thecalculated value of PE in a manner similar to that discussed above inconjunction with FIGS. 7A-7D. That is, if the magnitude of PE is lessthan the predetermined phase-error threshold, then the phase shifter 60maintains PCLK at its current phase. If PE is positive and greater inmagnitude than the predetermined threshold, then the phase shifter 60retards the phase of PCLK by an amount that is proportional to themagnitude of PE. Conversely, if PE is negative and greater in magnitudethan the predetermined threshold, then the phase shifter 60 advances thephase of PCLK by an amount that is proportional to the magnitude of PE.To stabilize the phase-correction loop formed by the circuit 122, thephase shifter 60 may, for each new value of PE received from the phasedetector 136, only partially correct the phase of PCLK.

If necessary, the circuit 122 repeats the above-described sequence untilthe phase error PE is less than the predetermined phase-error threshold,and the pixels 251 in the lines 92 and 94 are aligned or approximatelyaligned as shown in FIG. 11A.

Still referring to FIGS. 9, 11A, and 11B, alternate embodiments of thistechnique are contemplated.

For example, instead of generating each pixel 251 only once, the beamcontroller 52 can cause the beam 50 to generate multiple instances ofeach pixel 251, and the phase detector 136 can filter out noise bycalculating the intensity of each pixel 251 as the average intensity ofthe respective multiple pixel instances.

Furthermore, although discussed in conjunction with the pixels 251 inthe lines 92 and 94, this technique works with any other pixels withwhich the sensor 128 is aligned, and regardless of where the verticalboundary 142 bisects the pixels when the phase error of PCLK is zero.

In addition, because the horizontal boundary 140 of the sensor 128 isnot used in the above-described technique for determining the phaseerror in PCLK, instead of including four sensing regions S1-S4, thesensor may include only two sensing regions (left and right) and thusomit the boundary 140 as discussed above in conjunction with FIG. 10.

Referring to FIGS. 9, 10, 12, 13, and 14, next is described a techniquethat the circuit 122 may use for both detecting and correcting the phaseerror of PCLK and detecting and correcting an error in the width D ofthe scan region 74.

FIG. 12 shows two plots 150 and 152 of the sinusoidally sweptsynchronization beam 50 (FIG. 9) versus time for respective widths D₁and D₂ of the scan region 74 (FIG. 10).

One can see that although the plots 150 and 152 have the same period Tand cross zero at the same times t₃ and t₄, these plots have anarbitrary amplitude −A at different times t₂ and t₅, and t₁ and t₆,respectively—although A is shown as a negative value relative to thezero-crossing, it may be a positive value. More specifically, the plot150, which has corresponds to the larger width D₁ and which thus has thelarger amplitude, first crosses −A at t₂, and then crosses −A again att₅. Times t₂ and t₅ are symmetrical; that is, the time between t₀ and t₂(t₂−t₀) equals the time between t₅ and T (T−t₅). In contrast, the plot152, which corresponds to the smaller width D₂ and which thus has thesmaller amplitude, first crosses A at t₁, which is before t₂, and thencrosses A again at t₆, which is after t₅. Like the times t₁ and t₅, thetimes t₁ and t₆ are symmetrical; that is, the time between to and t₁(t₁−t₀) equals the time between t₆ and T (T-t₆).

Based on the analysis in the preceding paragraph, one can generallystate that a plot of the beam position over a scan region of any widthD_(n), where D_(n)/2≧A, crosses −A at a unique pair of symmetrical timest_(a) and t_(b).

Consequently, if the circuit 122 (FIG. 9) “knows” the values of A,t_(a), and t_(b) for a given width D of the scan region 74 (FIG. 10) andthe sensor 128 (FIG. 10) is located at the amplitude A or −A, then thecircuit 122 can detect and correct for an error in D as discussed below.

FIG. 13 is a plot 160 of the sinusoidally swept synchronization beam 50(FIG. 9) versus the angular equivalent of time for the scan region 74(FIG. 10) having a width D and for an amplitude −A=−D/4 (x=4 in FIG.10). As is known, for a periodic function such as the sinusoidal plot160, t=0 is equivalent to 0 radians, and t=T is equivalent to 2πradians. Also known is that the plot 160 crosses −A =−D/4 at π/3 radiansand 5π/3 radians. And where N is the number of pixels in a horizontalline of width D, π/3 radians is equivalent to pixel N/6, and 5π/3radians is equivalent to pixel 5N/6. Consequently, referring to FIG. 10,if the vertical boundary 142 of the sensor 128 is placed a distance D/4from the midline 77 of the scan region 74 (the midline 77 corresponds tothe zero crossings of the plot 160), then the circuit 122 (FIG. 9) candetect and correct for an error in the width D, and thus can set thewidth D to a desired value as discussed below.

FIG. 14 is a plan view of the sensor 128 and of the pixels 226 in thehorizontal lines 92 and 94 aligned in a manner that indicates that thephase error of PCLK is zero, and that the horizontal amplitude error(HAE) of the width D of the scan region 74 (FIG. 10) is also zero. Inthis example, the number of pixels N in each of the lines 92 and 94 ofthe scan region 74 is 900, and the vertical boundary 142 of the sensor128 is actually shifted to the right of D/4 by ½ pixel. The reason forthis is that 900/4=225, so D/4 is actually between the pixels 225 and226 when the phase error of PCLK is zero. But because in this example itis desired to have the boundary 142 bisect the pixels 226 through theircenters, the sensor 128 is shifted to the right as indicated;alternatively, the sensor 128 may be shifted to the left such that theboundary 142 bisects the centers of the pixels 225 (not shown in FIG.14). Or the vertical boundary 142 of the sensor 128 may be aligned withD/4. Although this latter alignment may cause an error in the width D,this error may be tolerable depending on the application.

Referring to FIGS. 9, 10, 13, and 14, the technique for using thecircuit 122 for both setting the phase error of PCLK to zero and settingof the width D of the scan region 74 to zero is described in detail.This technique is similar, but not identical, to the technique forsetting the phase error of PCLK to zero as described above inconjunction with FIGS. 11A and 11B.

First, the circuit 122 sets the phase error of PCLK to zero as discussedabove in conjunction with FIGS. 1A and 11B. Therefore, similar to thepixels 251 in FIG. 11A, the pixels 226 of the horizontal lines 92 and 94are vertically aligned, but it is unknown whether the boundary 142 isaligned with the centers of the pixels 226. If at first the sensor 128cannot detect the pixels 226, then the horizontal amplitude error of thewidth D may be so large that no portions of the pixels 226 strike thesensor 128. To remedy this, either a human operator (not shown) or thehorizontal-width adjuster 130 may cause the horizontal drive circuit 44to vary D until the sensor 128 detects the pixels 226.

Next, during a left-to-right scan of the line 92, the beam controller 52activates the beam source 48 such that the beam generates the pixel 226in the line 92; similarly, for a subsequent right-to-left scan of theline 94, the beam controller activates the beam source such that thebeam generates the pixel 226. in the line 94

Then, during the generation of each of the pixels 226 in the lines 92and 94 per the preceding paragraph, each sensing region S1-S4 of thesensor 128 generates a respective detection signal DS1-DS4 as discussedabove in conjunction with FIGS. 11A and 11B.

Next, for each of the sensing regions S1-S4, the horizontal-widthadjuster 130 stores the relative intensities for each of the pixels 226that the beam 50 generates, and from these intensities determines thehorizontal amplitude error of the width D.

Generally, where the pixel 226 in the line 92 is vertically aligned withthe pixel 226 in the line 94, and both of these pixels 226 arehorizontally centered about the sensor boundary 142, then the horizontalamplitude error of D is zero. With reference to the sensor 128, wherethe portion of the pixel 226 in line 92 on the left side of the boundary142 equals the portion of the same pixel 226 on the right side of theboundary 142, and the portion of the pixel 226 in line 94 on the leftside of the boundary 142 equals the portion of the same pixel 226 on theright side of the boundary 142, the horizontal amplitude error of D iszero.

Therefore, for the pixels 226 in the lines 72 and 94, thehorizontal-width adjuster 130 next computes respectiveposition-dependent intensity values PDI according to equations (3) and(4) above.

If PDI₉₂ and PDI₉₄ both equal zero or approximately zero, then thehorizontal width adjuster 130 determines that the horizontal amplitudeerror in the width D of the scan region 74 is less than a predeterminederror threshold, and thus determines that D needs no adjustment.

If PDI₉₂ and PDI₉₄ are both positive and greater than a magnitude of apredetermined threshold (the centers of the pixels 226 are both shiftedto the left of the boundary 142), then the horizontal width adjuster 130determines that the width D of the scan region 74 is wider than thepredetermined desired width (HAE is positive), and thus that thehorizontal drive circuit 44 must reduce the driving force imparted tothe mirror 14 to drive the horizontal amplitude error toward or to zero.

In contrast, if PDI₉₂ and PDI₉₄ are both negative and greater than amagnitude of a predetermined threshold, (the centers of the pixels 226are both shifted to the right of the boundary 142), then thehorizontal-width adjuster 130 determines that the width D of the scanregion 74 is narrower than the predetermined desired width (HAE isnegative), and thus that the horizontal drive circuit 44 must increasethe driving force imparted to the mirror 14 to drive the horizontalamplitude error toward or to zero.

Next, the horizontal drive circuit 44 adjusts the width D as indicatedby the calculated value of HAE. That is, if the magnitude of HAE is lessthan the magnitude of a predetermined amplitude-error threshold, thenthe drive circuit 44 maintains D at its current width. If HAE ispositive and greater than the magnitude of the predetermined threshold,then the drive circuit 44 reduces the width D by an amount that isproportional to the magnitude of HAE. Conversely, if HAE is negative andgreater than the magnitude of the predetermined threshold, then thedrive circuit 44 increases the width D an amount that is proportional tothe magnitude of HAE. To stabilize the scan-width-correction loop formedby the circuit 122, the drive circuit 44 may, for each new value of HAEreceived from the horizontal width adjuster 130, only partially correctthe width D.

If necessary, the circuit 122 repeats the above-described sequence untilthe both the phase error PE and the horizontal amplitude error HAE areless than their respective predetermined thresholds such that the pixels226 in the lines 92 and 94 are centered or approximately centered aboutthe boundary 142 as shown in FIG. 14.

Still referring to FIGS. 9, 10, and 14, alternate embodiments of thistechnique are contemplated.

For example, instead of generating each pixel 226 in the lines 92 and 94only once, the beam controller 52 can generate multiple instances ofeach pixel 226, and the horizontal-width adjuster 130 can filter outnoise by calculating the intensities of the pixels 226 in the lines 92and 94 equal to the average intensities of the respective multiple pixelinstances.

Furthermore, although discussed in conjunction with the pixels 226 inthe lines 92 and 94 where A=D/4, this technique works with any othernonzero value of A.

In addition, because the horizontal boundary 140 of the sensor 128 isnot used in the above-described technique for determining the phaseerror in PCLK and the horizontal amplitude error in the width D, insteadof including four sensing regions S1-S4, the sensor may include only twosensing regions (left and right) and thus omit the boundary 140 asdiscussed above in conjunction with FIG. 10.

Moreover, instead of calculating the values of PDI₉₂ and PDI₉₄ perequations (3) and (4), the horizontal-width adjuster 130 may calculateonly the numerators of these values. The reason for this is that becausethese values are not compared to one another, the adjuster 130 need notnormalize them.

Referring to FIGS. 9, 10, and 15, next is described a technique that thecircuit 122 may use for detecting and correcting a vertical amplitudeerror (VAE) in the height H of the scan region 74.

FIG. 15 is a plan view of the sensor 128 and of a pixel 226 in thehorizontal line 92 aligned in a manner that indicates that the phaseerror of PCLK is zero, that the horizontal amplitude error in the widthD of the scan region 74 (FIG. 10) is zero, and that the verticalamplitude error in the height V of the scan region is also zero. In thisexample, the number of pixels N in the line 92 is 900, and the verticalboundary 142 of the sensor 128 is actually shifted to the right of D/4by ½ pixel as discussed above in conjunction with FIG. 14.

First, the circuit 122 sets both the phase error of PCLK and thehorizontal amplitude error in the width D to zero as discussed above inconjunction with FIGS. 11A, 11B, and 14.

Next, during a left-to-right scan of the line 92, the beam controller 52activates the beam source 48 such that the beam generates the pixel 226in the line 92.

Then, during the generation of the pixel 226 in the line 92 per thepreceding paragraph, each region S1-S4 of the sensor 128 generates arespective detection signal DS1-DS4 as discussed above in conjunctionwith FIGS. 11A and 11B.

Next, for each of the sensing regions S1-S4, the vertical-heightadjuster 132 stores the relative intensities for the pixel 226 that thebeam 50 generates, and from these intensities determines the verticalamplitude error VAE in the height V.

Generally, where the pixel 226 is vertically centered about thehorizontal boundary 140 (as shown in FIG. 15), then VAE is zero, and Vhas the desired predetermined value. With reference to the sensor 128,where the portion of the pixel 226 in the line 92 on the top side of theboundary 140 equals the portion of the same pixel 226 on the bottom sideof the boundary 140, VAE is zero.

Therefore, for the pixel 226 in the line 92, the vertical-width adjuster132 next computes a vertical position-dependent intensity value PDIVaccording to the following equation:PDIV ₉₂=[(S1₉₂ +S2₉₂)−(S3₉₂ +S4₉₂)]  (5)

If PDIV₉₂ equals zero or approximately zero, then the vertical-widthadjuster 132 determines that the vertical amplitude error in the heightV of the scan region 74 is less than a predetermined error threshold,and thus determines that V needs no adjustment.

If PDIV₉₂ is positive and greater than a magnitude of a predeterminederror threshold, (the center of the pixel 226 is above the boundary140), then the vertical-height adjuster 132 determines that the height Vof the scan region 74 is greater than a predetermined desired height,and thus that the vertical drive circuit 124 must reduce the drivingforce imparted to the mirror 14 to drive the vertical amplitude errorVAE toward or to zero.

In contrast, if PDIV₉₂ is negative and greater than a magnitude of apredetermined error threshold (the center of the pixel 226 is below theboundary 140), then the vertical-height adjuster 132 determines that theheight V of the scan region 74 is smaller than a predetermined desiredheight, and thus that the vertical drive circuit 124 must increase thedriving force imparted to the mirror 14 to drive the vertical amplitudeerror VAE toward or to zero.

Next, the vertical drive circuit 124 adjusts the value of V as indicatedby the calculated value of VAE. That is, if the magnitude of VAE is lessthan the predetermined amplitude-error threshold, then the drive circuit124 maintains V at its current value. If VAE is positive and greaterthan the magnitude of a predetermined threshold, then the drive circuit124 reduces the height V by an amount that is proportional to themagnitude of VAE. Conversely, if VAE is negative and greater than themagnitude of a predetermined threshold, then the drive circuit 124increases the height V an amount that is proportional to the magnitudeof VAE. To stabilize the scan-height-correction loop formed by thecircuit 122, the drive circuit 124 may, for each new value of VAEreceived from the vertical height adjuster 132, only partially correctthe height V.

If necessary, the circuit 122 repeats the above-described sequence untilthe magnitude of the vertical amplitude error VAE is less than apredetermined threshold such that the pixel 226 in the line 92 iscentered or approximately centered about the horizontal sensor boundary140 as shown in FIG. 15.

Still referring to FIGS. 9, 10, and 15, alternate embodiments of thistechnique are contemplated.

For example, instead of generating the pixel 226 in the line 92 onlyonce, the beam controller 52 can generate multiple instances of thepixel 226, and the vertical-height adjuster 132 can filter out noise bycalculating the intensity of the pixel 226 as the average intensity ofthe multiple pixel instances.

Furthermore, although discussed in conjunction with the pixel 226 in theline 92, this technique works with any other pixel and line position.That is, the line 92 need not be the top-most line of the scan region74, but can be any line between the top of the image frame 72 and thetop of the scan region. Furthermore, the pixel can be any pixel withinthe line 92 that strikes the sensor 128.

In addition, because the vertical boundary 142 of the sensor 128 is notused in the above-described technique for setting the height V, insteadof including four sensing regions S1-S4, the sensor may include only twosensing regions (top and bottom) and thus omit the boundary 142 asdiscussed above in conjunction with FIG. 10. Of course this top/bottomconfiguration may prohibit the use of the sensor 128 for correcting thephase error of PCLK and the horizontal amplitude error in the scan widthD.

Moreover, instead of correcting the phase error of PCLK and thehorizontal amplitude error in the width D of the scan region 74 beforecorrecting the vertical amplitude error in the height V of the scanregion, the circuit 122 may correct the vertical amplitude error first,where the circuit 122 may adjust V such that the horizontal boundary 140intersects the center of the pixel 226 (or other pixel being used)regardless of the position of the pixel relative to the verticalboundary 142.

Furthermore, in a potentially less accurate alternative, the verticalheight adjuster 132 may adjust V until at least one region S1-S4 of thesensor 128 detects the pixel 226 in the line 92. Because thisalternative requires only one sensor regions, this alternative may beimplemented with a single-sensing-region sensor such as the sensor 54 ofFIGS. 5-6.

FIG. 16 is a block diagram of a scanned image subsystem 160, whichincludes the circuit 122 and which is otherwise similar to the subsystem120 of FIG. 9. However, the subsystem 160 is different than thesubsystem 120 in that the PLL 46 of the subsystem 160 receives thehorizontal reference signal H_(ref) from the sensor 128 instead of fromthe horizontal drive circuit 44. The sensor 128 may generate H_(ref)with less jitter than the horizontal drive circuit 44.

In operation of the subsystem 160 after the circuit 122 has correctedthe phase of PCLK and has corrected the width D, and the height V of thescan region 74 (FIG. 10) as needed, once per vertical-scan cycle of themirror 14 the beam controller 52 causes the beam 50 to generate a pixel(e.g., the pixel 226 in line 92) that strikes the sensor 128. Inresponse to sensing the pixel, the sensor 128 generates a pulse H_(ref)(e.g., H_(ref) may be the same as one of the signals DS, or may be asummation of these signals). Of course, the phase of H_(ref) is shiftedby the number of the pixel that strikes the sensor 128. But because thisphase shift is constant, one can program the phase shifter 60 to take itinto account.

FIG. 17 is a diagram of a virtual-retinal display (VRD) system 170 thatmay incorporate the image-scanning subsystem 40 of FIG. 5, theimage-scanning subsystem 120 of FIG. 9, or the image-scanning subsystem160 of FIG. 16. For purposes of illustration, FIG. 17 shows the system170 incorporating the subsystem 40 of FIG. 5. In addition to the system40, the system 170 includes a conventional beam generator 172 forgenerating an image beam 174. The mirror 14 is operable to sweep theimage beam 174 across a display screen or surface such as a retina 176to generate an image frame thereon. As stated above in conjunction withFIG. 5, the image beam 174 may be the same as or different from thesynchronization beam 50. If these beams are the same, then the beamgenerator 172 may be disposed within the subsystem 40, or the subsystem40 may be disposed within the beam generator 172.

In operation, the beam generator 172 directs the image beam 174 onto themirror 14, which sweeps the beam 174 through a pupil 178 and across theretina 176 by rotating back and forth as discussed above in conjunctionwith FIG. 1.

FIG. 18 is a block diagram of a scanned-beam imager system 180 that mayincorporate the image-scanning subsystem 40 of FIG. 5, theimage-scanning subsystem 120 of FIG. 9, or the image-scanning subsystem160 of FIG. 16. For purposes of illustration, FIG. 18 shows the system180 incorporating the subsystem 40 of FIG. 5. An illuminator 182 createsa first beam of light 184. The subsystem system 40 deflects the firstbeam of light across a field-of-view (FOV) to produce a second scannedbeam of light 186, shown in two positions 186 a and 186 b. The scannedbeam of light 186 sequentially illuminates spots 188 in the FOV, shownas positions 188 a and 188 b, corresponding to beam positions 186 a and186 b, respectively. While the beam 186 illuminates the spots 188, theilluminating light beam 190 is reflected, absorbed, scattered,refracted, or otherwise affected by the properties of the object ormaterial to produced scattered light energy. A portion of the scatteredlight energy 190, shown emanating from spot positions 188 a and 188 b asscattered energy rays 190 a and 190 b, respectively, travels to one ormore detectors 192 that receive the light and produce electrical signalscorresponding to the amount of light energy received. The electricalsignals drive a controller 194 that builds up a digital image andtransmits it for further processing, decoding, archiving, printing,display, or other treatment or use via interface 196.

Light source 182 may include multiple emitters such as, for instance,light-emitting diodes (LEDs), lasers, thermal sources, arc sources,fluorescent sources, gas discharge sources, or other types ofilluminators. In some embodiments, illuminator 182 comprises a red laserdiode having a wavelength of approximately 635 to 670 nanometers (nm).In another embodiment, illuminator 182 comprises three lasers; a reddiode laser, a green diode-pumped solid state (DPSS) laser, and a blueDPSS laser at approximately 635 nm, 532 nm, and 473 nm, respectively.While laser diodes may be directly modulated, DPSS lasers generallyrequire external modulation such as an acousto-optic modulator (AOM) forinstance. In the case where an external modulator is used, it isconsidered part of light source 182. Light source 182 may include, inthe case of multiple emitters, beam combining optics to combine some orall of the emitters into a single beam. Light source 182 may alsoinclude beam-shaping optics such as one or more collimating lensesand/or apertures. Additionally, while the wavelengths described are inthe optically visible range, other wavelengths may be within the scopeof the invention.

Light beam 184, while illustrated as a single beam, may comprise aplurality of beams converging on a single scanner mirror 14 or ontoseparate mirrors 14.

A 2D MEMS or other scanner 14 scans one or more light beams at highspeed in a pattern that covers an entire 2D FOV or a selected region ofa 2D FOV within a frame period. A typical frame rate may be 60 Hz, forexample. Often, it is advantageous to run one or both scan axesresonantly. In one embodiment, one axis is run resonantly at about 19KHz while the other axis is run non-resonantly in a sawtooth pattern soas to create a progressive scan pattern. A progressively scannedbidirectional approach with a single beam scanning horizontally at scanfrequency of approximately 19 KHz and scanning vertically in sawtoothpattern at 60 Hz can approximate an SVGA resolution. In one such system,the horizontal scan motion is driven electrostatically and the verticalscan motion is driven magnetically. Alternatively, both the horizontaland vertical scan may be driven magnetically or capacitively.Electrostatic driving may include electrostatic plates, comb drives orsimilar approaches. In various embodiments, both axes may be drivensinusoidally or resonantly.

Several types of detectors may be appropriate, depending upon theapplication or configuration. For example, in one embodiment, thedetector may include a simple PIN photodiode connected to an amplifierand digitizer. In this configuration, beam position information may beretrieved from the scanner or, alternatively, from optical mechanisms,and image resolution is determined by the size and shape of scanningspot 188. In the case of multi-color imaging, the detector 192 maycomprise more sophisticated splitting and filtering to separate thescattered light into its component parts prior to detection. Asalternatives to PIN photodiodes, avalanche photodiodes (APDs) orphotomultiplier tubes (PMTs) may be preferred for certain applications,particularly low light applications.

In various approaches, simple photodetectors such as PIN photodiodes,APDs, and PMTs may be arranged to stare at the entire FOV, stare at aportion of the FOV, collect light retrocollectively, or collect lightconfocally, depending upon the application. In some embodiments, thephotodetector 192 collects light through filters to eliminate much ofthe ambient light.

The present device may be embodied as monochrome, as full-color, andeven as a hyper-spectral. In some embodiments, it may also be desirableto add color channels between the conventional RGB channels used formany color cameras. Herein, the term grayscale and related discussionshall be understood to refer to each of these embodiments as well asother methods or applications within the scope of the invention. In thecontrol apparatus and methods described below, pixel gray levels maycomprise a single value in the case of a monochrome system, or maycomprise an RGB triad or greater in the case of color or hyperspectralsystems. Control may be applied individually to the output power ofparticular channels (for instance red, green, and blue channels), may beapplied universally to all channels, or may be applied to a subset ofthe channels.

In some embodiments, the illuminator may emit a polarized beam of lightor a separate polarizer (not shown) may be used to polarize the beam. Insuch cases, the detector 192 may include a polarizer cross-polarized tothe scanning beam 186. Such an arrangement may help to improve imagequality by reducing the impact of specular reflections on the image.

From the foregoing it will be appreciated that, although specificembodiments of the invention have been described herein for purposes ofillustration, various modifications may be made without deviating fromthe spirit and scope of the invention. For example, referring to FIGS.5, 9, and 16 the synchronization beam 50 may be any type ofelectromagnetic beam, such as a light beam or an electron beam. Wherethe beam 50 is an electron beam, then the mirror 14 may be replaced withan electron-beam sweeping circuit. Furthermore, where an alternative isdisclosed for a particular embodiment, this alternative may also applyto other embodiments even if not specifically stated.

1. A circuit, comprising: a beam generator operable to direct a beamtoward a beam sweeper in response to a clock signal, the beam sweeperhaving a sweep phase and the clock signal having a clock phase; a sensoroperable to detect the beam from the beam sweeper; and a phase detectorcoupled to the sensor and operable to detect an error in the clock phasefrom the detected beam.
 2. The circuit of claim 1 wherein the beamgenerator comprises: a beam source operable to generate the beam; and abeam controller operable to activate the beam source in response to theclock signal.
 3. The circuit of claim 1 wherein the sensor comprises aphoto diode.
 4. The circuit of claim 1 wherein the sensor comprisesfirst and second contiguous sensing regions.
 5. The circuit of claim 1wherein the sensor comprises four sensing regions that are contiguous ata point.
 6. The circuit of claim 1 wherein the error in the clock phaseis related to a difference between the clock phase and the sweep phase.7. The circuit of claim 1, further comprising a phase shifter coupled tothe phase detector and operable to shift the clock phase in a directionthat reduces the error in the clock phase.
 8. The circuit of claim 1wherein the sensor is disposed between a mid line and a side of a regionthat the beam sweeper is operable to scan.
 9. The circuit of claim 1wherein: the detected beam has an intensity; and the sensor is operableto measure the intensity of the detected beam and to determine the errorin the clock phase from the measured intensity.
 10. The circuit of claim1 wherein the beam comprises an image beam.
 11. The circuit of claim 1wherein the beam comprises a dedicated synchronization beam.
 12. A mask,comprising: a frame defining an aperture having an edge and having amidline; and a sensor disposed on the frame between the edge and themidline of the aperture and operable to detect a swept beam.
 13. Themask of claim 12 wherein the aperture is square.
 14. The mask of claim12, further comprising a signal connector mounted to the frame, having afirst end coupled to the sensor, and having a second end operable to becoupled to a circuit remote from the frame.
 15. An image system,comprising: a beam sweeper; a first driver operable to drive the beamsweeper in a first dimension such that the beam sweeper has a sweepphase; a clock generator operable to generate a pixel clock having aclock phase; a beam generator coupled to the clock generator andoperable to direct a beam toward the beam sweeper in response to thepixel clock; a sensor operable to detect the beam redirected by the beamsweeper; and a phase detector coupled to the sensor and operable todetect an error in the clock phase from the detected beam.
 16. The imagesystem of claim 15 wherein the beam sweeper comprises amicroelectricalmechanical scanner.
 17. The image system of claim 15wherein the first driver is operable to cause the beam sweeper toresonate in the dimension.
 18. The image system of claim 15 wherein: thebeam sweeper has a resonant sweep frequency in the first dimension; andthe first driver is operable to drive the beam sweeper at a frequencythat is within approximately 5% of the resonant sweep frequency.
 19. Theimage system of claim 15 wherein: the first driver is operable togenerate a drive signal at a drive frequency at which the first driverdrives the beam sweeper; and the clock generator is coupled to the firstdriver and comprises a phase-locked loop that is operable to generatethe pixel clock having a frequency that is as a multiple of the drivefrequency.
 20. The image system of claim 15 wherein: the first driver isoperable to cause the beam sweeper to have a first sweep amplitude inthe first dimension; and the phase detector is operable to detect anerror in the first sweep amplitude from the detected beam and to provideto the first driver a correction signal that causes the driver to adjustthe first sweep amplitude toward a predetermined value.
 21. The imagesystem of claim 15, further comprising: wherein the first driver isoperable to cause the beam sweeper to have a first sweep amplitude inthe first dimension; a second driver operable to drive the beam sweeperin a second dimension and to cause the beam sweeper to have a secondsweep amplitude in the second dimension; and wherein the phase detectoris operable to detect respective errors in the first and second sweepamplitudes from the detected beam and to provide to the first and seconddrivers respective first and second correction signals that cause thedrivers to adjust the first and second sweep amplitudes towardsrespective first and second predetermined values.
 22. The image systemof claim 15 wherein the clock generator is coupled to the sensor andcomprises a phase-locked loop that is operable to generate the pixelclock from the detected beam.
 23. The image system of claim 15 whereinthe sensor comprises a single sensing region.
 24. The image system ofclaim 15 wherein the sensor comprises first and second contiguoussensing regions.
 25. The image system of claim 15 wherein the sensorcomprises four square quadrants that are contiguous at a point.
 26. Theimage system of claim 15, further comprising a phase shifter coupled tothe phase detector and operable to shift the clock phase in a directionthat reduces the error in the clock phase.
 27. The image system of claim15, further comprising a reflector operable to direct the beam asredirected by the beam sweeper to the sensor.
 28. The image system ofclaim 15 wherein the sensor is disposed between a mid line and a side ofa region that the beam sweeper is operable to scan in the firstdimension.
 29. A method, comprising: activating a beam in response to aclock as the beam moves in a direction, the clock having a phase;determining a first position of the activated beam as the beam moves inthe direction; activating the beam in response to the clock as the beammoves in an opposite direction; determining a second position of theactivated beam as the beam moves in the opposite direction; anddetecting an error in the phase of the clock from the first and secondpositions.
 30. The method of claim 29 wherein: activating the beam as itmoves in the direction comprises activating the beam in response to acycle of the clock that corresponds to a predetermined pixel in a firstline of a scan region; and activating the beam as it moves in theopposite direction comprises activating the beam in response to a cycleof the clock that corresponds to the predetermined pixel in a secondline of the scan region.
 31. The method of claim 29 wherein determiningthe first and second positions comprises measuring respective first andsecond intensities of the beam at a predetermined location.
 32. Themethod of claim 31 wherein: measuring the first intensity of the beamcomprises measuring a first portion of the first intensity at a firstlocation and measuring a second portion of the first intensity at asecond location; measuring the second intensity of the beam comprisesmeasuring a first portion of the second intensity at the second locationand measuring a second portion of the second intensity at the firstlocation; and detecting the error in the phase of the clock comprisescomparing the first portion of the first intensity with the secondportion of the second intensity, and comparing the second portion of thefirst intensity with the first portion of the second intensity.
 33. Themethod of claim 31 wherein: measuring the first intensity of the beamcomprises measuring a first portion of the first intensity at a firstlocation and measuring a second portion of the first intensity at asecond location that is spaced from the first location in a dimensionparallel to the direction and the opposite direction; measuring thesecond intensity of the beam comprises measuring a first portion of thesecond intensity at the second location and measuring a second portionof the second intensity at the first location; and detecting the errorin the phase of the clock comprises comparing the first portion of thefirst intensity with the second portion of the second intensity, andcomparing the second portion of the first intensity with the firstportion of the second intensity.
 34. The method of claim 29, furthercomprising detecting an error in a distance that the beam sweeps in thedirection from the first and second intensities.
 35. The method of claim29, further comprising detecting from the first and second intensitiesan error in a distance that the beam sweeps in a dimension perpendicularto the direction.
 36. A method, comprising: activating a beam inresponse to a clock as the beam moves a distance in a direction;determining a first position of the activated beam as the beam moves inthe direction; detecting an error in the distance from the firstposition.
 37. The method of claim 36 wherein activating the beam as itmoves in the direction comprises activating the beam in response to acycle of the clock that corresponds to a predetermined pixel in a lineof a scan region.
 38. The method of claim 36 wherein determining thefirst position comprises measuring a first intensity of the beam at apredetermined location.
 39. The method of claim 36 wherein: determiningthe first position of the beam comprises measuring a first intensity ofthe beam at a first location and measuring a second intensity of thebeam at a second location that is spaced from the first location in adimension parallel to the direction; and detecting the error in thedistance comprises comparing the first intensity with the secondintensity.
 40. The method of claim 36, further comprising: activatingthe beam in response to the clock as the beam moves in an oppositedirection; determining a second position of the activated beam as thebeam moves in the opposite direction; and wherein detecting the error inthe distance comprises detecting the error from the second position. 41.A method, comprising: activating a beam in response to a clock as thebeam moves in a direction; determining a position of the activated beamas the beam moves in the direction; and detecting from the position ofthe beam an error in a distance that the beam sweeps in a dimensionperpendicular to the direction.
 42. The method of claim 41 whereinactivating the beam as it moves in the direction comprises activatingthe beam in response to a cycle of the clock that corresponds to apredetermined pixel in a predetermined line of scan region.
 43. Amethod, comprising: sensing a swept beam at a predetermined location;and synchronizing a signal to the sensing of the beam.
 44. The method ofclaim 43 wherein: the sensing comprises sensing the swept beam as thebeam moves beyond an edge of a sensing window; and the synchronizingcomprises generating a predetermined portion of the signal in responseto the beam moving a predetermined distance beyond the edge of thesensing window.
 45. The method of claim 43 wherein: the swept beam hasan intensity; the sensing comprises integrating the intensity of thebeam as the beam moves beyond an edge of a sensing window; and thesynchronizing comprises generating an edge of the signal in response tothe integrated intensity becoming equal to or greater than apredetermined value.
 46. The method of claim 43 wherein sensing theswept beam comprises sensing a swept electromagnetic beam.
 47. Themethod of claim 43 wherein sensing the swept beam comprises sensing aswept beam of visible light.
 48. The method of claim 43 wherein sensingthe swept beam comprises sensing a swept electron beam.